package Demo2;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 殇
 * Date: 2025-07-13
 * Time: 18:18
 */
public class Test2 {
    public static void main(String[] args) {
        char[] ch=new char[]{'a','b','c'};
        String s1=new String(ch);
        s1.intern();
        String s2="abc";
        System.out.println(s1==s2);
    }
    public static void main2(String[] args) {
        String str1=new String("abc");
        String str2=new String("abc");
        System.out.println(str1==str2);
    }
    public static void main1(String[] args) {
        String str1="abc";
        String str2="abc";
        System.out.println(str1==str2);
    }
}
